<?php
/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

class Custom_View_Helper_HomeMenu extends Zend_View_Helper_Abstract
{
    public function homeMenu ()
    {
		#user login
        $auth		= Zend_Auth::getInstance();

		$menu   = "<ul>";

		if ($auth->hasIdentity()) {

			$logoutUrl  =  $this->view->baseUrl('user/logout');
			$dashboardUrl  =  $this->view->baseUrl('user/dashboard');
			$accountUrl  =  $this->view->baseUrl('user/account');
			$user		=  ucfirst($auth->getIdentity()->first_name). " ".ucfirst($auth->getIdentity()->last_name);
			
            $menu  .= '<li><a href="'.$accountUrl.'">'. $user.'</a></li>';
			$menu  .= '<li><a href="'.$dashboardUrl.'">'.__('Dashboard').'</a></li>';
			$menu  .= '<li><a href="'.$logoutUrl.'">'.__('Logout').'</a></li>';
        }
		
		#user section end
		$menu  .= "</ul>";
     
        return $menu;
    }

}

?>
